:root {
    --header-height: 75px;
    --bg-color: #FFEFE3;         /* your light pink */
    --accent:    #b87c5f;     /* active tab color */
    --text:      #0F262B;
    --header-bg-color: white;
    --header-bg-image: none;
  }
:target{
  scroll-margin-top: 120px; /* headerin korkeus */
}
  /* RESET & GLOBALS */
  *,
  *::before,
  *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  body { overflow-x:hidden; }
  body {
    font-family: 'Hepta Slab';
    background-color: var(--bg-color);
    color: var(--text);
    /* push all content below the fixed header */
    padding-top: var(--header-height);
    display: grid;
    min-height: 100svh;
    grid-template-rows: auto 1fr auto; /* hero | main grows | footer */
  }

  a {
    text-decoration: none;
    color: inherit;
  }

  .subhead h2{
  font-family: "Hepta-slab", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.25;
  padding: 0.5rem 2rem;
  color: #0F262B;
  text-align: center;
}

  main .huuto {
    font-family: 'Hepta Slab';
    text-align: center;
    font-size: clamp(18px, 4vw, 24px);
    margin: 10px;
    padding-top: 1rem;
  }
  
  /* === 1) TOP BAR === */
  header.top-bar {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--header-bg-color);
    background-image: var(--header-bg-image);
    background-size: auto 1200%;          /* scale vertically to fit header */
    background-position: center center;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    padding-left: 4rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
    overflow: visible;
  }
  
  /* logo on the left */
  .top-bar .logo {
    height: 100px;
    position: absolute;
    left: 2rem;
    top: 0;
    transform: translateY(23%);
    z-index: 1001;
  }
  
  /* tabs in the center */
  .top-bar .nav-tabs {
    display: flex;
    gap: 2rem;
  }
  .top-bar .nav-tabs .tab {
    padding: 0.7em 1.2em;
    background: rgba(255, 254, 250, 0.7);
    border-radius: 999px;
    font-weight: bold;
    transition: background 0.2s, color 0.2s;
  }
  .top-bar .nav-tabs .tab:hover:not(.active) {
    background: var(--color-LuonnonValkoinen);
  }
  .top-bar .nav-tabs .active {
    background: var(--accent);
    color: var(--color-LuonnonValkoinen);
  }
  
  /* hamburger on the right (only shown on small screens) */
  .top-bar .hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
  }
  .top-bar .hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
  }
  
  /* === 2) HERO + TORN EDGE === */
  .hero {
    width: 100%;
    height: 68vh;
    background-color: var(--bg-color);
    overflow: hidden;         /* crops anything outside the box */
  }
  .hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;        /* fills the box */
    object-position: bottom center; /* pins the image’s bottom edge */
    display: block;
  }
  
  /* === 3) MAIN CONTENT === */
  main {
    max-width: 100vw;
  }
  main h1 {
    font-family: 'Expletus Sans';
    font-weight: 700;
    text-align: center;                        /* center it */
    color: var(--accent);                             /* pick your hex color */
    font-size: clamp(45px, 12vw, 96px);        /* fluid: min 2.5rem, max 5rem */
    padding: 0rem 0.5rem;                          /* vertical spacing & small side gutters */
    line-height: 1.1;                           /* tighten up the lines if it wraps */
  }

  main h2{
  font-family: "Expletus Sans", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.25;
  margin: 0;
  color: #0F262B;
}

.Intro {
  padding: 2rem 1.5rem;
}
  main ul {
    list-style: disc inside;
    margin-top: 1rem;
  }

 

  /* Biisis sivun hommelit*/
  .page-biisi {
  background-color: #FFEFE3;
  background-image: url('Images/Vaiski26_Sininen_Huomaamaton_JPG.jpg');
  background-repeat: repeat;
  background-size: 700px auto;
  }

  .page-biisi header.top-bar {
    background-color: #2B6B80;
  }

  .lyrics-box {
  font-family: 'Hepta Slab';
  max-width: 400px;
  margin: 2rem auto;                 /* center the box */
  padding: 2rem 2.5rem;
  background: rgba(255,255,255,0.6);/* white tint for readability */
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  line-height: 1.65;
  white-space: pre-line;

  }

  .rip-hero{
  --safe-block: clamp(40px, 10vh, 120px);
  width: 100%;
  max-width: 100%;
  aspect-ratio: 1652 / 768;              
  min-height: 420px;                      
  display: grid;
  place-items: center;
  padding-block: var(--safe-block);
  text-align: center;

  background: url("Images/Vaiski pattern rip turkoosi.png")
              top center / 100% auto no-repeat;
}

.rip-hero .inner {
  width: 100%;
  max-width: 1000px;
  padding-inline: clamp(12px, 4vw, 24px);
  margin-inline: auto;
}
.headline{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 0rem 2rem;
  max-width: 100vw;
}


.headline .h2{ 
  font-family: "Expletus Sans", system-ui, sans-serif; 
  font-weight: 800; 
  font-size: clamp(1.8rem, 3.5vw, 4rem);
  color: var(--color-yösininen); 
  text-align: center; 
  flex: 1 1 0;     
  min-width: 0;     
  max-width: 1100px;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.valiteksti,
.info-box,
.headline__inner,
h1,
h2,
h3 {
  padding-left: clamp(16px, 4vw, 32px);
  padding-right: clamp(16px, 4vw, 32px);
}

.headline__icon{
  display: block;
  flex: 0 0 auto;
  width: clamp(60px, 8vw, 130px);
  height: auto;
  max-width: 20vw;
}

.headline__icon--left{  justify-self: end; }
.headline__icon--right{ justify-self: start; }

.lede{
  max-width: 1100px;          
  width: min(1100px, 90vw);   
  margin: 0 auto;             
  text-align: center;
  padding: 0 2rem;           
}

.drops{
  width: 100%;
  max-width: 1000px;
  margin: 2rem auto;
  padding-inline: 0rem;
}

.drop{
  margin: 1rem 0;
  border: 0;
}

.drop__summary{
  list-style: none;
  cursor: pointer;
  background: var(--color-TurkoosiTumma);
  color: var(--color-LuonnonValkoinen, #fff);
  padding: 0.9rem 1.25rem;
  border-radius: 999px;
  font-family: "Hepta Slab";
  font-weight: 700;
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto; /* title | chevron */
  align-items: center;
  position: relative;
  z-index: 2;
}


.drop__summary::-webkit-details-marker{ display:none; }
.drop__summary::marker{ content:""; }

.drop__title{
  line-height: 1.2;
  padding-right: .75rem;
}

.drop__chev{
  width: 24px; height: 24px;
  transition: transform .2s ease;
}
.drop[open] .drop__chev{ transform: rotate(180deg); }

.drop__content{
  background: #71dcc1;
  color: var(--text);
  margin-top: .5rem;
  padding: 1.25rem 1.5rem;
  border-radius: 25px;
  line-height: 1.6;
  position: relative;
  z-index: 1;
  margin-top: -40px;    
  padding-top: 50px;     
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
}

.drop__content ul {
  padding-top: 5px;
  list-style-position: inside;
  padding-left: 0;
}

@media (max-width: 600px){
  .drop__summary{ padding: .8rem 1rem; }
  .drop__content{ padding: 1rem 1rem; 
  padding-top: 50px; }
}

@media (prefers-reduced-motion: reduce){
  .drop__chev{ transition: none; }
}

@media (max-width: 640px){
  .headline { justify-content: center;
  padding-bottom: 1rem; }
  .headline__icon { display: none; }
}


@media (max-aspect-ratio: 1652/768){
  .rip-hero{
    background-position: center;
    background-size: cover;
  }
  
}

/* Big, centered title */
.rip-hero__title{
  font-family: "Expletus Sans", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(2.2rem, 4vw + .5rem, 5rem);
  line-height: 1.05;
  letter-spacing: .01em;
  color: var(--color-LuonnonValkoinen);
  margin: 0;
  max-width: min(1100px, 90vw);
  text-shadow: 0 2px 15px rgba(0,0,0,0.6);
}
  
  /* --- mobile: hide or reposition icons so they don’t overlap text --- */
  @media (max-width: 600px) {
     .hero {height: 60vh;}
    .feature {
      grid-template-columns: 1fr;
      grid-template-areas:
        "media"
        "text";
    }
    
  }


  /* === 4) RESPONSIVE HAMBURGER BEHAVIOR === */
 
  @media (max-width: 800px) {
    .infobox {
      flex-direction: column-reverse;
    }
    .top-bar .nav-tabs {
      display: none;
      position: absolute;
      top: var(--header-height);
      right: 0;
      background: white;
      flex-direction: column;
      width: 200px;
      box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
    .top-bar .nav-tabs.open {
      display: flex;
    }
    .top-bar .hamburger {
      display: flex;
    }
  }
  


  .info-box {
  --box-bg: var(--color-TurkoosiTapiola);
  max-width: min(1000px, 92vw);
  margin: 2.5rem auto;
  padding: clamp(1rem, 2.5vw, 2rem);
  background: var(--box-bg);
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(0,0,0,.08);
  position: relative;
  line-height: 1.6;
}

/* Otsikot ja listat laatikossa */
.info-box h2 {
  margin: 0 0 .5rem 0;
  font-family: "Expletus Sans", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.info-box p { margin: 0 0 1rem 0; }

.info-box ul {
  margin: 0;
  padding-left: 0rem;
}

.info-box ul ul {
  list-style-type: circle;
  padding-left: 1.5rem;
}

.info-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 2fr;
  gap: 0;
  border: 2px solid #000;
  margin-top: 1rem;
}

.info-grid > div {
  padding: 0.5rem 0.75rem;
  border: 1px solid #000;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.valiteksti {
  text-align: center;
  margin-top: 20px;
  
}

.valiteksti p {
  max-width: 1000px;
  margin: 0 auto;
  text-align: left;
}

.valiteksti h3 {
  margin-top: 30px;
  margin-bottom: 20px;
}


@media (max-width: 700px){
  /* 2 saraketta mobiilissa */
  .info-grid{
    grid-template-columns: 1fr 1fr;
  }

  /* Piilota otsikkorivi */
 .info-grid .grid-header:nth-child(3){
    display: none; /* piilota Huomiot-otsikko */
  }

  /* Huomiot = joka 3. solu (nimi, määrä, huomiot)
     -> venytä kahden sarakkeen levyiseksi ja siirrä alle */
  .info-grid > div:nth-child(3n){
    grid-column: 1 / -1;
  }

  /* Jos huomiot on tyhjä, älä näytä sitä ollenkaan */
  .info-grid > div:nth-child(3n):empty{
    display: none;
  }

    /* Lisää "Huomiot:" vain niihin huomiot-soluihin joissa on sisältöä */
  .info-grid > div:nth-child(3n):not(:empty)::before{
    content: "Huomiot:";
    display: block;
    font-weight: 700;
    margin-bottom: .25rem;
    opacity: .85;
  }

  /* Estä pitkä teksti venyttämästä ruutua */
  .info-grid > div{
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

.grid-header {
  font-weight: bold;
  background: rgba(255,255,255,0.2);
}

.challenge-section{
  max-width: 1100px;
  margin: 3rem auto 0;
  padding: 0 1.25rem;
}

.challenge-split{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items:center;
}
@media (max-width: 900px){ .challenge-split{ grid-template-columns: 1fr; } }

.challenge-actions{ display:flex; gap:.75rem; flex-wrap:wrap; margin-top:1rem; }

.btn {
  border: none;
  appearance: none;
  -webkit-appearance: none;
  inline-size: 240px;
  display: inline-block;
  background: var(--btn-bg);
  color: var(--yonsininen);
  font-family: "Hepta Slab", system-ui, sans-serif;
  font-weight: 500;
  text-decoration: none;
  text-align: center;
  padding: 12px 20px;
  border-radius: 200px;
  transition: transform .06s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover{ background: var(--btn-hover); }

.preview-btn{ width:100%; border:0; background:transparent; padding:0; cursor:pointer; text-align:center; }
.preview-img{
  width:100%;
  max-width:520px;
  display:block;
  margin:0 auto;
}

h3 {
  font-family: "Expletus Sans", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.25;
  margin: 0 0 .4rem 0;
  color: var(--yonsininen);
}

.text-link{
  color: var(--color-SininenTumma);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}

.text-link:hover{
  color: var(--accent);
  text-decoration-thickness: 2px;
}

.text-link:visited{
  color: var(--color-SininenTumma); /* estää violetti-vierailtu */
}

.text-link:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}




.subcamp-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;

  margin: 2rem auto 0rem;
  max-width: 1000px;
  padding: 0 1rem;
}

.subcamp-logos img {
  height: auto;
  width: 22%;        /* 4 kuvaa vierekkäin */
  max-height: 200px; /* ei kasva liian isoksi */
  object-fit: contain;
}





/* =========================
   LEIRIKIRJEET FULL BLEED
========================= */

.letters-strip {
  position: relative;
  width: 100%;
  margin: 3rem 0 4rem;
  padding: clamp(48px, 6vw, 76px) 0 clamp(56px, 7vw, 92px);
  background: url("Images/Vaiski pattern rip turkoosi.png") center / cover no-repeat;
  overflow: hidden;
  min-height: 730px;
  display: flex;
  align-items: center;
}

.letters-strip__inner {
  max-width: 1200px;
  margin: 0 auto;

  width: 100%;
}

.letters-strip__title {
  margin: 0 0 28px;
  font-family: "Expletus Sans", sans-serif;
  font-weight: 700;
  font-size: clamp(2.2rem, 4vw + 0.5rem, 4.5rem);
  line-height: 1.05;
  text-align: center;
  color: #0f262b;
}

.letters-strip__scroller {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  justify-content: center;
  padding-left: 20px;
  padding-right: 20px;
}

.letters-strip__scroller::-webkit-scrollbar {
  display: none;
}

/* =========================
   KORTIT
========================= */

.letter-card {
  position: relative;
  flex: 0 0 300px;     /* 🔒 kiinteä leveys */
  width: 300px;        /* varmistus */
  height: 340px;       /* 🔒 kiinteä korkeus */
  border-radius: 22px;
  overflow: hidden;
  background: #d9d9d9;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

.letter-card__image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
}

.letter-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  padding: 22px 18px 20px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.72) 0%,
    rgba(0, 0, 0, 0.30) 42%,
    rgba(0, 0, 0, 0.02) 76%
  );
}

.letter-card__title {
  margin: 0;
  font-family: "Hepta Slab", serif;
  font-weight: 700;
  font-size: clamp(2rem, 2vw, 2.4rem);
  line-height: 1.1;
  text-align: center;
  color: var(--color-LuonnonValkoinen);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.letter-card__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* =========================
   NAPIT
========================= */

.letter-btn {
  display: inline-block;
  min-width: 132px;
  padding: 11px 20px;
  border: none;
  border-radius: 999px;
  background: #2d7ea1;
  color: #f8f1ea;
  text-decoration: none;
  text-align: center;
  font-family: "Hepta Slab", serif;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.letter-btn:hover {
  background: #246987;
  color: #f8f1ea;
  transform: translateY(-1px);
}

.letter-btn:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}

/* =========================
   MODAL
========================= */

.letter-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.letter-modal.is-open {
  display: block;
}

.letter-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
}

.letter-modal__panel {
  position: relative;
  width: min(1000px, 94vw);
  height: min(88vh, 900px);
  margin: 4vh auto 0;
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.letter-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #0f262b;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.letter-modal__frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 640px) {
  .letters-strip__scroller {
    justify-content: flex-start;
    padding-left: 16px;
    padding-right: 16px;
    gap: 14px;
    scroll-snap-type: x mandatory;
  }

  .letter-card {
    width: 100px;
    height: 300px;
    max-width: none;
  }
}

@media (max-width: 640px) {
  .letters-strip {
    margin: 2rem 0 3rem;
    padding: 40px 0 56px;
  }

  .letters-strip__title {
    margin-bottom: 20px;
  }

  .letters-strip__scroller {
    gap: 16px;
  }

  .letter-card__overlay {
    padding: 18px 14px 16px;
    gap: 12px;
  }

  .letter-card__actions {
    gap: 10px;
  }

  .letter-btn {
    min-width: 118px;
    padding: 10px 16px;
    font-size: 0.95rem;
  }

  .letter-modal__panel {
    width: 96vw;
    height: 82vh;
    margin-top: 6vh;
  }
}